package io.admin.modules.sys.controller;

import io.admin.modules.sys.dao.ViewDao;
import io.admin.modules.sys.entity.view.ViewNameValueEntity;
import io.admin.modules.sys.entity.view.ViewNameValueLotEntity;
import io.common.utils.Result;
import io.swagger.annotations.Api;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/sys/view")
@Api(tags = "可视化管理")
@AllArgsConstructor
public class ViewController {

    @Autowired
    private ViewDao viewDao;

    @GetMapping("view1")
    public Result getView1() {
        List<ViewNameValueEntity> res = viewDao.getView1();
        return new Result().ok(res);
    }

    @GetMapping("view2")
    public Result getView2() {
        List<ViewNameValueEntity> res = viewDao.getView2();
        return new Result().ok(res);
    }


    @GetMapping("view3")
    public Result getView3() {
        List<ViewNameValueEntity> res = viewDao.getView3();
        return new Result().ok(res);
    }


    @GetMapping("view4")
    public Result getView4() {
        List<ViewNameValueEntity> res = viewDao.getView4();
        return new Result().ok(res);
    }


    @GetMapping("view5")
    public Result getView5() {
        List<ViewNameValueLotEntity> res = viewDao.getView5();
        return new Result().ok(res);
    }


    @GetMapping("view6")
    public Result getView6() {
        List<ViewNameValueEntity> res = viewDao.getView6();
        return new Result().ok(res);
    }

    @GetMapping("view7")
    public Result getView7() {
        List<ViewNameValueEntity> res = viewDao.getView7();
        return new Result().ok(res);
    }


    @GetMapping("view8")
    public Result getView8() {
        List<ViewNameValueEntity> res = viewDao.getView8();
        return new Result().ok(res);
    }

}
